package com.jr.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.jr.mapper.EnterpriseMapper;
import com.jr.mapper.PostsMapper;
import com.jr.pojo.*;
import com.jr.entry.Posts;
import com.jr.mapper.PostsMapper;
import com.jr.service.PostsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;

@Service
public class PostsServiceImpl implements PostsService {

    @Autowired
    private PostsMapper postsMapper;



    @Override
    public ArrayList<EntAndPosts> selectByStatus(EntAndPosts entAndPosts) {
        return postsMapper.selectstatus(entAndPosts);
    }


    @Override
    public ArrayList<PostPname> selectAll() {

        return postsMapper.selectAll();
    }

    @Override
    public ArrayList<EnterpriseAndPosts> selectShow() {
        return postsMapper.selectShow();
    }

    @Override
    public ArrayList<SearchJob> selectJob(SearchJob searchJob) {
        System.out.println("service层的数据为:"+postsMapper.SearchJobShow(searchJob));
        return postsMapper.SearchJobShow(searchJob);

    }

    @Override
    public ArrayList<EntAndPosts> selectLike(EntAndPosts entAndPosts) {
        return postsMapper.selectLike(entAndPosts);
    }

    @Override
    public boolean updateApply(UserAndPosition userAndPosition) {
        return postsMapper.updateapply(userAndPosition)==1?true:false;
    }

    @Override
    public boolean updateApply1(ShowPost showPost) {
        return postsMapper.updateapply1(showPost)==1?true:false;
    }



    @Override
    public ArrayList<ShowPost> selectAllByPname(ShowPost showPost) {
        return postsMapper.selectAllByPname(showPost);
    }

    @Override
    public ArrayList<ShowPost> selectPostByEid(ShowPost showPost) {
        return postsMapper.selectPostByEid(showPost);
    }


    @Override
    public boolean updateConcern(ShowPost showPost) {
        return postsMapper.updateConcern(showPost)==1?true:false;
    }


}
